var util = require('../../utils/util.js')
var mpage = 1
Page({
  data: {
    goodsList:null,
    styleImag:null
  },
  onLoad: function (params) {
    var that = this;
    var murl = `/c2mwebservice/api/v2/public/index/style/${params.categoryId}/${params.styleId}?page=${mpage}&rows=20`;
    //请求数据
    util.request(murl,function( dataJson ) {
       that.setData({
                    goodsList: dataJson.returnData.goodsList.rows,
                    styleImag: dataJson.returnData.styleImage,
                    loadingHidden:true
                })
    }, function( reason ) {
        
    });
  },

  onShow: function() {
    console.log(this.data)
  },
    onShareAppMessage: function(){
        return {
            title: 'Cotte',
            desc: '酷特智能'
        }
    }
})